# Maintainer: Daniel M. Capella <polyzen@archlinux.org>

pkgname=toastify
pkgver=0.5.4
pkgrel=1
pkgdesc='Commandline tool that shows desktop notifications using notify-rust'
arch=('loong64' 'x86_64')
url=https://github.com/hoodie/toastify
license=('Apache' 'MIT')
depends=('dbus')
makedepends=('git' 'rust')
source=("git+$url.git#tag=v$pkgver")
b2sums=('SKIP')

prepare() {
  cd $pkgname
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd $pkgname
  cargo build --release --locked --offline
}

package() {
  cd $pkgname
  install -Dt "$pkgdir"/usr/bin target/release/$pkgname
  install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE-MIT
}
